def run(params:list[str]):
    from ApiTools import apiTools,apiBase
    from ApiModels import apiModels
    collects=apiBase.argv_array(params,1,'proc/extract/tablename;',';')
    sys_prompt=apiBase.argv_json(params,2,'You are a Postgresql database expert')
    doc=apiBase.argv(params,3,"hostname(222)")
    ids=apiBase.argv_array(params,4)

    try:
        vectdb = apiTools.load_vec()
        vcts=apiModels.get_vects(collects,ids)
        ret=vectdb.doc2qa(vcts,sys_prompt,doc)
        return ret
    except Exception as e:
        return f"function error:{e}"
        #apiBase.save_log("生成错误",f"{e}")